#num = 3
#for i in range(1,4):
    #循环空格
 #   for j in range(3-1,0,-1):
  #      print(" " ,end="")
        # 循环*
   # for k in range(1,2*3,2):
    #    print("*",end="")
     #   print()
#菱形 for i in range(1,2*((hang-1)//2+1),2);

hang = 9
for i in range(1,2*((hang-1)//2+1),2):
    print(("*"*i).center(hang))
for i in range(2*((hang-1)//2)-1,0,-2):
    print(("*"*i).center(hang))

#水仙花

for bai in range(1, 10):  # 百位
    for shi in range(0, 10):  # 十位
        for ge in range(0, 10):  # 个位
            i = bai * 100 + shi * 10 + ge
            if i == bai ** 3 + shi ** 3 + ge ** 3:
                print(i)

#99乘法表
i = 1
while i <= 9:
    for j in range(1, i+1):  # range()函数左闭右开
        print(f'{i}*{j}={i*j}', end=' ')
    i += 1
    print()


